<?php


namespace app\admin\system\controller;


use app\common\controller\BaseAdminController;
use Tinywan\Captcha\Captcha;

class CaptchaController extends BaseAdminController
{
    protected $noNeedLogin = ['*'];

    public function captcha()
    {
        $data = Captcha::base64();
        return $this->success([
            'token' => $data['key'],
            'image' => $data['base64'],
        ]);
    }
}